获取jspm_packages/npm/aurelia-bootstrapper@1.0.1.js 404(未找到)

时间:2018-05-16 13:03:17

标签: jspm

我收到以下错误:

// NoteForm.js
class NoteForm extends Component {

    state = {
        tags: []
    };

    handleAddItem = (e, {value}) => {
        this.setState({
            tags: [{text: value, value}, ...this.state.tags],
        });
    };

    render() {
        return (
            <Form onSubmit={this.props.handleSubmit}>

                <Field

                    name='description'
                    component={TextAreaField}
                    maxLength='5'
                    label='Description'/>

                <Field
                    name='tags'
                    onAddItem={this.handleAddItem}
                    component={DropdownField}
                    label='Tags'/>

                <Form.Field control={Button} primary className='submit-btn' type='submit'>
                    Login
                </Form.Field>
            </Form>
        );
    }
}

const mapDispatchToProps = () => ({
    handleSubmit: note => console.log(note)//dispatch(addNote(note))
});

export default reduxForm({form: 'noteForm', validate})(connect(null, mapDispatchToProps)(NoteForm));

我尝试了以下链接解决方案,但它无效。 SystemJS (Aurelia with jspm) fails to load "aurelia-pal-browser" from jspm_packages folder

我已多次运行jspm install和npm install。

尝试访问浏览器中的js文件会导致错误:

system.src.js:1041 GET http://localhost:9001/jspm_packages/npm/aurelia-bootstrapper@1.0.1.js 404 (Not Found)
W @ system.src.js:1041
(anonymous) @ system.src.js:1777
(anonymous) @ system.src.js:1776
(anonymous) @ system.src.js:2801
(anonymous) @ system.src.js:3379
(anonymous) @ system.src.js:3711
(anonymous) @ system.src.js:4103
(anonymous) @ system.src.js:4568
(anonymous) @ system.src.js:4837
(anonymous) @ system.src.js:408
Promise.then (async)
s @ system.src.js:402
i @ system.src.js:388
(anonymous) @ system.src.js:544
a @ system.src.js:342
(anonymous) @ system.src.js:838
Promise.then (async)
import @ system.src.js:831
(anonymous) @ system.src.js:1800
(anonymous) @ (index):24
system.src.js:123 Uncaught (in promise) Error: (SystemJS) XHR error (404 Not Found) loading http://localhost:9001/jspm_packages/npm/aurelia-bootstrapper@1.0.1.js
    Error: XHR error (404 Not Found) loading http://localhost:9001/jspm_packages/npm/aurelia-bootstrapper@1.0.1.js
    Error loading http://localhost:9001/jspm_packages/npm/aurelia-bootstrapper@1.0.1.js

我也尝试访问其他文件,似乎唯一可访问的文件夹是/ jspm_packages /但不是子文件夹。

有什么想法吗?

1 个答案:

答案 0 :(得分:0)

我做的是从另一位同事那里获取了项目的整个目录。 从他的文件夹一切正常。

我在某处看到这些东西可能是jspm中的错误造成的。

无论如何,这是一个解决方法。