質問編集履歴
4
エラー情報更新
test
CHANGED
File without changes
|
test
CHANGED
@@ -1,3 +1,67 @@
|
|
1
|
+
npm update -g npmでアップデートしようとしたらこのようなエラーが発生してしまいました。。
|
2
|
+
|
3
|
+
|
4
|
+
|
5
|
+
> amino-no-MacBook-Pro:MERY-PC aminohiroshi$ npm update -g npm
|
6
|
+
|
7
|
+
> npm ERR! Darwin 14.5.0
|
8
|
+
|
9
|
+
> npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "update" "-g" "npm"
|
10
|
+
|
11
|
+
> npm ERR! node v4.4.7
|
12
|
+
|
13
|
+
> npm ERR! npm v2.15.8
|
14
|
+
|
15
|
+
> npm ERR! path /usr/local/lib/node_modules/npm
|
16
|
+
|
17
|
+
> npm ERR! code EACCES
|
18
|
+
|
19
|
+
> npm ERR! errno -13
|
20
|
+
|
21
|
+
> npm ERR! syscall rmdir
|
22
|
+
|
23
|
+
>
|
24
|
+
|
25
|
+
> npm ERR! Error: EACCES: permission denied, rmdir '/usr/local/lib/node_modules/npm'
|
26
|
+
|
27
|
+
> npm ERR! at Error (native)
|
28
|
+
|
29
|
+
> npm ERR! { [Error: EACCES: permission denied, rmdir '/usr/local/lib/node_modules/npm']
|
30
|
+
|
31
|
+
> npm ERR! errno: -13,
|
32
|
+
|
33
|
+
> npm ERR! code: 'EACCES',
|
34
|
+
|
35
|
+
> npm ERR! syscall: 'rmdir',
|
36
|
+
|
37
|
+
> npm ERR! path: '/usr/local/lib/node_modules/npm' }
|
38
|
+
|
39
|
+
> npm ERR!
|
40
|
+
|
41
|
+
> npm ERR! Please try running this command again as root/Administrator.
|
42
|
+
|
43
|
+
> npm ERR! error rolling back Error: EACCES: permission denied, rmdir '/usr/local/lib/node_modules/npm'
|
44
|
+
|
45
|
+
> npm ERR! error rolling back at Error (native)
|
46
|
+
|
47
|
+
> npm ERR! error rolling back { [Error: EACCES: permission denied, rmdir '/usr/local/lib/node_modules/npm']
|
48
|
+
|
49
|
+
> npm ERR! error rolling back errno: -13,
|
50
|
+
|
51
|
+
> npm ERR! error rolling back code: 'EACCES',
|
52
|
+
|
53
|
+
> npm ERR! error rolling back syscall: 'rmdir',
|
54
|
+
|
55
|
+
> npm ERR! error rolling back path: '/usr/local/lib/node_modules/npm' }
|
56
|
+
|
57
|
+
>
|
58
|
+
|
59
|
+
> npm ERR! Please include the following file with any support request:
|
60
|
+
|
61
|
+
> npm ERR! /Users/aminohiroshi/Documents/MERY-PC/npm-debug.log
|
62
|
+
|
63
|
+
|
64
|
+
|
1
65
|
rollupインストール後の変化
|
2
66
|
|
3
67
|
> mery-pc@1.0.0 build /Users/User/Documents/MERY-PC
|
3
コマンドラインの変化を追加
test
CHANGED
File without changes
|
test
CHANGED
@@ -1,3 +1,45 @@
|
|
1
|
+
rollupインストール後の変化
|
2
|
+
|
3
|
+
> mery-pc@1.0.0 build /Users/User/Documents/MERY-PC
|
4
|
+
|
5
|
+
> rollup -c
|
6
|
+
|
7
|
+
>
|
8
|
+
|
9
|
+
> { [Error: Cannot find module 'babel-preset-es2015'] code: 'MODULE_NOT_FOUND' }
|
10
|
+
|
11
|
+
> Error transforming /Users/User/Documents/MERY-PC/src/main.js with 'babel' plugin: Cannot find module 'es2015'
|
12
|
+
|
13
|
+
> Error: Error transforming /Users/User/Documents/MERY-PC/src/main.js with 'babel' plugin: Cannot find module 'es2015'
|
14
|
+
|
15
|
+
> at Function.Module._resolveFilename (module.js:325:15)
|
16
|
+
|
17
|
+
> at Function.require.resolve (internal/module.js:16:19)
|
18
|
+
|
19
|
+
> at module.exports (/Users/User/Documents/MERY-PC/node_modules/babel-preset-es2015-rollup/node_modules/modify-babel-preset/index.js:76:21)
|
20
|
+
|
21
|
+
> at Object.<anonymous> (/Users/User/Documents/MERY-PC/node_modules/babel-preset-es2015-rollup/index.js:3:18)
|
22
|
+
|
23
|
+
> at Module._compile (module.js:409:26)
|
24
|
+
|
25
|
+
> at Object.Module._extensions..js (module.js:416:10)
|
26
|
+
|
27
|
+
> at Module.load (module.js:343:32)
|
28
|
+
|
29
|
+
> at Function.Module._load (module.js:300:12)
|
30
|
+
|
31
|
+
> at Module.require (module.js:353:17)
|
32
|
+
|
33
|
+
> at require (internal/module.js:12:17)
|
34
|
+
|
35
|
+
> Type rollup --help for help, or visit https://github.com/rollup/rollup/wiki
|
36
|
+
|
37
|
+
|
38
|
+
|
39
|
+
|
40
|
+
|
41
|
+
パッケージとコマンドライン
|
42
|
+
|
1
43
|
> MacBook-Pro:mery-pc User$ npm list --depth=0
|
2
44
|
|
3
45
|
mery-pc@1.0.0 /Users/User/Documents/MERY-PC
|
2
情報追加
test
CHANGED
File without changes
|
test
CHANGED
@@ -1,3 +1,87 @@
|
|
1
|
+
> MacBook-Pro:mery-pc User$ npm list --depth=0
|
2
|
+
|
3
|
+
mery-pc@1.0.0 /Users/User/Documents/MERY-PC
|
4
|
+
|
5
|
+
├── babel-preset-es2015-rollup@1.2.0
|
6
|
+
|
7
|
+
├── riot@2.6.1
|
8
|
+
|
9
|
+
├── rollup-plugin-babel@2.6.1
|
10
|
+
|
11
|
+
├── rollup-plugin-commonjs@3.3.1
|
12
|
+
|
13
|
+
├── rollup-plugin-json@2.0.1
|
14
|
+
|
15
|
+
├── rollup-plugin-node-resolve@2.0.0
|
16
|
+
|
17
|
+
└── rollup-plugin-riot@0.4.2
|
18
|
+
|
19
|
+
|
20
|
+
|
21
|
+
> MacBook-Pro:mery-pc User$ npm run build
|
22
|
+
|
23
|
+
> mery-pc@1.0.0 build /Users/User/Documents/MERY-PC
|
24
|
+
|
25
|
+
> rollup -c
|
26
|
+
|
27
|
+
>
|
28
|
+
|
29
|
+
> sh: rollup: command not found
|
30
|
+
|
31
|
+
>
|
32
|
+
|
33
|
+
> npm ERR! Darwin 14.5.0
|
34
|
+
|
35
|
+
> npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "build"
|
36
|
+
|
37
|
+
> npm ERR! node v4.4.7
|
38
|
+
|
39
|
+
> npm ERR! npm v2.15.8
|
40
|
+
|
41
|
+
> npm ERR! file sh
|
42
|
+
|
43
|
+
> npm ERR! code ELIFECYCLE
|
44
|
+
|
45
|
+
> npm ERR! errno ENOENT
|
46
|
+
|
47
|
+
> npm ERR! syscall spawn
|
48
|
+
|
49
|
+
> npm ERR! mery-pc@1.0.0 build: `rollup -c`
|
50
|
+
|
51
|
+
> npm ERR! spawn ENOENT
|
52
|
+
|
53
|
+
> npm ERR!
|
54
|
+
|
55
|
+
> npm ERR! Failed at the mery-pc@1.0.0 build script 'rollup -c'.
|
56
|
+
|
57
|
+
> npm ERR! This is most likely a problem with the mery-pc package,
|
58
|
+
|
59
|
+
> npm ERR! not with npm itself.
|
60
|
+
|
61
|
+
> npm ERR! Tell the author that this fails on your system:
|
62
|
+
|
63
|
+
> npm ERR! rollup -c
|
64
|
+
|
65
|
+
> npm ERR! You can get information on how to open an issue for this project with:
|
66
|
+
|
67
|
+
> npm ERR! npm bugs mery-pc
|
68
|
+
|
69
|
+
> npm ERR! Or if that isn't available, you can get their info via:
|
70
|
+
|
71
|
+
> npm ERR!
|
72
|
+
|
73
|
+
> npm ERR! npm owner ls mery-pc
|
74
|
+
|
75
|
+
> npm ERR! There is likely additional logging output above.
|
76
|
+
|
77
|
+
>
|
78
|
+
|
79
|
+
> npm ERR! Please include the following file with any support request:
|
80
|
+
|
81
|
+
> npm ERR! /Users/User/Documents/MERY-PC/npm-debug.log
|
82
|
+
|
83
|
+
|
84
|
+
|
1
85
|
以下の参考ページに従って、rollup.jsの設定を行ったのですが、buildをしようとすると、エラーが生じてしまします。
|
2
86
|
|
3
87
|
(単純にrollupをインストール、プラグインの導入、.babelrc作成、rollup.config.jsの作成、package.jsonのscriptに「"build": "rollup -c"」を追加しました。)
|
1
ファイルの修正済
test
CHANGED
File without changes
|
test
CHANGED
@@ -16,6 +16,114 @@
|
|
16
16
|
|
17
17
|
|
18
18
|
|
19
|
+
その後、以下の英語の記事を参考にしまし、以下のようにrollup.config.jsとpackeage.jsonを変更しましたが、エラーが解決しません。
|
20
|
+
|
21
|
+
|
22
|
+
|
23
|
+
[参考ページ](http://newbranch.cn/ui-development-with-es6-javascript-riotjs-and-rollupjs-introduction/)
|
24
|
+
|
25
|
+
|
26
|
+
|
27
|
+
```js
|
28
|
+
|
29
|
+
import json from 'rollup-plugin-json';
|
30
|
+
|
31
|
+
import babel from 'rollup-plugin-babel';
|
32
|
+
|
33
|
+
import riot from 'rollup-plugin-riot';
|
34
|
+
|
35
|
+
import npm from 'rollup-plugin-node-resolve';
|
36
|
+
|
37
|
+
import commonjs from 'rollup-plugin-commonjs';
|
38
|
+
|
39
|
+
|
40
|
+
|
41
|
+
export default {
|
42
|
+
|
43
|
+
entry: 'src/main.js',
|
44
|
+
|
45
|
+
dest: 'dest/bundle.js',
|
46
|
+
|
47
|
+
format: 'umd',
|
48
|
+
|
49
|
+
plugins: [
|
50
|
+
|
51
|
+
json(),
|
52
|
+
|
53
|
+
riot(),
|
54
|
+
|
55
|
+
nodeResolve({
|
56
|
+
|
57
|
+
jsnext: true,
|
58
|
+
|
59
|
+
main: true,
|
60
|
+
|
61
|
+
browser: true
|
62
|
+
|
63
|
+
}),
|
64
|
+
|
65
|
+
commonjs(),
|
66
|
+
|
67
|
+
babel()
|
68
|
+
|
69
|
+
]}
|
70
|
+
|
71
|
+
```
|
72
|
+
|
73
|
+
|
74
|
+
|
75
|
+
```json
|
76
|
+
|
77
|
+
{
|
78
|
+
|
79
|
+
"name": "mery-pc",
|
80
|
+
|
81
|
+
"version": "1.0.0",
|
82
|
+
|
83
|
+
"description": "",
|
84
|
+
|
85
|
+
"main": "src/main.js",
|
86
|
+
|
87
|
+
"scripts": {
|
88
|
+
|
89
|
+
"build": "rollup -c",
|
90
|
+
|
91
|
+
"test": "test"
|
92
|
+
|
93
|
+
},
|
94
|
+
|
95
|
+
"author": "User",
|
96
|
+
|
97
|
+
"license": "ISC",
|
98
|
+
|
99
|
+
"dependencies": {
|
100
|
+
|
101
|
+
"riot": "^2.6.1"
|
102
|
+
|
103
|
+
},
|
104
|
+
|
105
|
+
"devDependencies": {
|
106
|
+
|
107
|
+
"babel-preset-es2015-rollup": "^1.2.0",
|
108
|
+
|
109
|
+
"rollup-plugin-babel": "^2.6.1",
|
110
|
+
|
111
|
+
"rollup-plugin-commonjs": "^3.3.1",
|
112
|
+
|
113
|
+
"rollup-plugin-json": "^2.0.1",
|
114
|
+
|
115
|
+
"rollup-plugin-node-resolve": "^2.0.0",
|
116
|
+
|
117
|
+
"rollup-plugin-riot": "^0.4.2"
|
118
|
+
|
119
|
+
}
|
120
|
+
|
121
|
+
}
|
122
|
+
|
123
|
+
```
|
124
|
+
|
125
|
+
|
126
|
+
|
19
127
|
> 0 info it worked if it ends with ok
|
20
128
|
|
21
129
|
1 verbose cli [ '/usr/local/bin/node', '/usr/local/bin/npm', 'run', 'build' ]
|
@@ -50,7 +158,7 @@
|
|
50
158
|
|
51
159
|
10 verbose pkgid mery-pc@1.0.0
|
52
160
|
|
53
|
-
11 verbose cwd /Users/
|
161
|
+
11 verbose cwd /Users/user/Documents/MERY-PC
|
54
162
|
|
55
163
|
12 error Darwin 14.5.0
|
56
164
|
|